#ifndef SERIAL_H
#define SERIAL_H


typedef struct com_opt
{
    int baud_rate; // 9600,115200
    int data_bits; // 7,8
    char parity;   // 'N','E','O'
    int stop_bits; //1,2
} com_opt_t;

#ifdef __cpluscplus
extern "C"{
#endif
int open_com(char *path);
int set_com(int fd, const com_opt_t *com_opt);

#ifdef __cpluscplus    
}
#endif
#endif